<ix-modal-header
  [title]="editingUser() ? ('Edit User' | translate) : ('Add User' | translate)"
  [loading]="isFormLoading()"
></ix-modal-header>

<form
  class="ix-form-container"
  [formGroup]="form"
  (submit)="onSubmit()"
>
  <ix-fieldset>
    <div>
      <ix-input
        formControlName="username"
        class="username"
        [label]="'Username' | translate"
        [tooltip]="fakeTooltip"
        [required]="true"
      ></ix-input>
    </div>
  </ix-fieldset>

  <ix-allowed-access-section></ix-allowed-access-section>

  <ix-auth-section></ix-auth-section>

  <ix-additional-details-section></ix-additional-details-section>

  <ix-form-actions>
    <button
      mat-button
      type="submit"
      color="primary"
      ixTest="save"
      [disabled]="isFormInvalid() || isFormLoading()"
    >
      {{ 'Save' | translate }}
    </button>
  </ix-form-actions>
</form>
